package com.prft.rms.entity;

// Generated Aug 18, 2009 4:13:41 PM by Hibernate Tools 3.2.1.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * EmployeeCertification generated by hbm2java
 */
@Entity
@Table(name = "EMPLOYEE_CERTIFICATION", catalog = "RMS")
public class EmployeeCertification implements java.io.Serializable {

	private Integer certificationId;
	private Employee employee;
	private String certificationName;
	private Date issuedDate;
	private Integer validYear;

	public EmployeeCertification() {
	}

	public EmployeeCertification(Employee employee, String certificationName, Date issuedDate) {
		this.employee = employee;
		this.certificationName = certificationName;
		this.issuedDate = issuedDate;
	}

	public EmployeeCertification(Employee employee, String certificationName, Date issuedDate, Integer validYear) {
		this.employee = employee;
		this.certificationName = certificationName;
		this.issuedDate = issuedDate;
		this.validYear = validYear;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "CERTIFICATION_ID", unique = true, nullable = false)
	public Integer getCertificationId() {
		return this.certificationId;
	}

	public void setCertificationId(Integer certificationId) {
		this.certificationId = certificationId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EMID", nullable = false)
	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	@Column(name = "CERTIFICATION_NAME", nullable = false, length = 100)
	public String getCertificationName() {
		return this.certificationName;
	}

	public void setCertificationName(String certificationName) {
		this.certificationName = certificationName;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "ISSUED_DATE", nullable = false, length = 10)
	public Date getIssuedDate() {
		return this.issuedDate;
	}

	public void setIssuedDate(Date issuedDate) {
		this.issuedDate = issuedDate;
	}

	@Column(name = "VALID_YEAR")
	public Integer getValidYear() {
		return this.validYear;
	}

	public void setValidYear(Integer validYear) {
		this.validYear = validYear;
	}

}
